|
|
|
| |
|
|
|
|
You also see several internal data tables in this listing. The tables that start with ''MSYS" are used by Microsoft Jet to keep track of indexes, relationships, table definitions, and so on. Do not attempt to read, delete, or modify these tables. Doing so can permanently damage your database. |
|
|
|
|
|
|
|
|
|
|
The Field object contains all the information about the data table field. In the previous section on TableDef objects, you created and deleted fields. You can also access the Field object to get information on field properties. The Field object has only one collectionthe Properties collection. There are 17 properties and 4 methods. |
|
|
|
|
|
|
|
|
There are 17 Field properties. You can use these properties to determine the size and type of a field, and whether it is a native Microsoft Jet field object or an attached field from an external database. In version 3.0 Microsoft Jet formats, you can set the default value for the field, and define and enforce field-level validation rules. |
|
|
|
|
|
|
|
|
Listing 9.18 shows all the properties for selected fields. Add another button to the form. Set its Name property to cmdFields and its Caption property to &Field. Add the code in Listing 9.18 to the cmdFields_Click event window. |
|
|
|
|
|
|
|
|
Listing 9.18. Coding the cmdFields_Click event. |
|
|
|
|
|
|
|
|
Private Sub cmdFields_Click()
'
' show all the field properties of a table field
'
On Error GoTo LocalErr
'
Dim ws As Workspace
Dim db As Database
Dim td As TableDef
Dim fl As Field
Dim pr As Property
'
Dim strDBName As String
Dim strTDName As String |
|
|
|
|
|